<extend name="public@base"/>
block(name='main')
    .wrap.js-check-wrap
        ul.nav.nav-tabs(role="tablist")
            li.nav-item: a.nav-link.active(href="{:url('nav/index')}") 所有导航
            li.nav-item: a.nav-link(href="{:url('nav/add')}") 添加导航
        form(action="{:url('Rbac/listorders')}", method='post')
            php  $is_main=array("1"=>'是',"0"=>'否');
            table.table.table-hover.table-bordered
                thead
                    tr
                        th ID
                        th 名称
                        th 主导航
                        th 描述
                        th {:lang('ACTIONS')}
                tbody
                    <foreach name="navs" item="vo">
                        tr
                            td {$vo.id}
                            td {$vo.name}
                            td
                                empty(name='vo.is_main')
                                    span.label.label-default
                                        | {$is_main[$vo.is_main]}
                                    <else/>
                                    span.label.label-success
                                        | {$is_main[$vo.is_main]}
                            td {$vo.remark}
                            td
                                a.btn.btn-sm.btn-primary(href!="javascript:parent.openIframeLayer('{:url('NavMenu/index',array('nav_id'=>$vo['id']))}','{$vo.name}菜单管理',{});") 菜单管理
                                a.btn.btn-sm.btn-success(href!="{:url('nav/edit',array('id'=>$vo['id']))}") {:lang('EDIT')}
                                a.btn.btn-sm.btn-danger.js-ajax-delete(href!="{:url('nav/delete',array('id'=>$vo['id']))}") {:lang('DELETE')}
                    </foreach>